package com.kingboy.kbg.auth.api;

import com.kingboy.kbg.auth.dto.TokenDTO;
import com.kingboy.kbg.core.common.base.Result;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Create By 郭金宝 on 2018/6/15.<br>
 */
@FeignClient(name = "kbg-auth-server")
public interface AuthTokenApi {

    /**
     * 登录获取token
     * @param userName
     * @return
     */
    @RequestMapping(value = "/client/login", method = RequestMethod.POST)
    Result<TokenDTO> login(@RequestParam(value = "userName") String userName);

    /**
     * 登录获取token
     * @param userName
     * @return
     */
    @RequestMapping(value = "/client/login", method = RequestMethod.POST)
    Result<TokenDTO> login(@RequestParam(value = "userName") String userName,@RequestParam(value = "passWord") String passWord);

}
